<template>
  <el-input v-bind="inputProps">
    <!-- 插槽内容 -->
    <template v-for="(_, slot) in $slots" #[slot]="scope">
      <slot :name="slot" v-bind="scope || {}"></slot>
    </template>
  </el-input>
</template>

<script lang="ts">
import { defineComponent, PropType } from 'vue';
import { ElInput } from 'element-plus';

export default defineComponent({
  name: 'SInput',
  components: {
    ElInput,
  },
  props: {
    // 输入框的所有属性
    inputProps: {
      type: Object as PropType<Record<string, any>>,
      default: () => ({}),
    },
  },
});
</script>

<style scoped>
/* 你可以在这里添加一些样式 */
</style>
